package db

import (
	"time"

	"gorm.io/gorm"
)

type HttpEntity struct {
	gorm.Model
	ID     uint `gorm:"primaryKey"`
	Scheme string
	Method string
	Host   string
	Url    string
	Ip     string
	App    string

	RequestBody   string
	RequestTime   time.Time
	RequestHeader string

	ResponseCode   int
	ResponseBody   string
	ResponseTime   time.Time
	ResponseHeader string

	RawRequest  string
	RawResponse string
}

func (h *HttpEntity) Save() {
	db1.Save(h)
}
